using System;
using UnityEngine;

public static class TextScaleExt
{
	public static void SetTextScale(this tk2dTextMesh textMesh, int count)
	{
		if (textMesh.text.Length > count)
		{
			textMesh.transform.localScale = Vector3.one * ((float)count / (float)textMesh.text.Length);
		}
		else
		{
			textMesh.transform.localScale = Vector3.one;
		}
	}
}
